package com.eh.job;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by David Li on 2016/3/16.
 */
@Component
public class TestJob {
    private static int count = 0;
    private Logger logger = LoggerFactory.getLogger(TestJob.class);

    @Scheduled(cron = "0/5 * * * * ?")
    public void job() {
        logger.info(count++ + "");
    }
}
